var arr = [1,2]
// 覆盖了原有的toString方法
arr.toString = function() {return '43'}
arr.valueof = function() {return '42'}
console.log(Number(arr))
console.log(String(arr))
var obj1 = {
    valueof() {
        return '99'
    }
}
console.log(Number(obj1))